#include "iostream"
#include "cmath"

using namespace std;

class FRACTION {
	private:
		int mol, den;
		void reduce();
	public:
		void set(int, int);
		double real() {
			return double(mol) / double(den);
		}
		void show();
};

void FRACTION::reduce() {
	if (mol == 0) return;
	int m = (abs(mol) < abs(den)) ? abs(mol) : abs(den);
	while (m) {
		if (mol % m == 0 && den % m == 0) break;
		m--;
	}
	mol = mol / m;
	den = den / m;
}

void FRACTION::set(int a, int b) {
	mol = a;
	den = b;
	reduce();
	if (den < 0) {
		mol *= -1;
		den *= -1;
	}
}

void FRACTION::show() {
	cout << mol << '/' << den;
}

int main() {
	FRACTION a;
	int x, y;
	cin >> x >> y;
	a.set(x, y);
	a.show();
	cout << endl;
	cout << a.real() << endl;
	return 0;
}
